<?php
define( 'FOUNDRY_CONFIG_LOAD',	true );
//foundry config

unset( $FOUNDRY_CONFIG );

$FOUNDRY_CONFIG = array(
	'path'				=> '/www/htdocs/dev/foundry3/vendor/foundry',

	'webpath'			=> '/dev/foundry3/www',
	
	'namespace'			=> 'ld_',

	'databases'			=> array(
		'production'		=> array(
			'host'				=> 'localhost',
			'user'				=> 'username',
			'password'			=> 'password',
			'database'			=> 'database',
			'driver'			=> 'mysql',
			'type'				=> 'PDO',
			'options'			=> array(
				PDO::ATTR_PERSISTENT		=> true,
			),
		),
	),

);

$FOUNDRY_CONFIG['appPath']	=
	realpath( $FOUNDRY_CONFIG['path'].'/../../app/' );

$FOUNDRY_CONFIG['confPath']	=
	realpath( $FOUNDRY_CONFIG['path'].'/../../config/' );

$FOUNDRY_CONFIG['libPath']	=
	realpath( $FOUNDRY_CONFIG['path'].'/../../libs/' );


if ( !defined( '__FOUNDRY_CONFIG_PATH' ) ) {
	define( '__FOUNDRY_CONFIG_PATH', $_SERVER['DOCUMENT_ROOT']
	.'/foundry.config.php' );
}

include_once( $FOUNDRY_CONFIG['path'].'/Foundry.class.php' );

Foundry::init();

Foundry::load( 'DB_FoundryDb', false, false );
FoundryDb::useDb( 'production' );


?>